The present invention concerns data transfer over a network and pertains particularly to automatic detection of full or half duplex capability in a remote network legacy ethernet node.
Full duplex mode in networks that operate in accordance with the ethernet network protocol is a mode of data transmission that supports duplex transmission as defined in IEEE Std 610.7-1995. Full duplex allows simultaneous communication between two nodes over a point-to-point medium. Unlike half duplex transmission, where only one node transmits data at a time, full duplex operation does not require carrier sense to be monitored for any transmission. For full duplex transmission to happen, both nodes need to be capable of full duplex operation over a point-to-point link.
The IEEE 802.3 standard defines technology for carrier sense multiple access with collision detection (CSMA/CD) access method and physical layer specifications. The IEEE 802.3u standard defines technology for 100 megabits per second networking. Within the physical sublayer (PHY), as defined in Clauses 24 and 25 of the specification IEEE 802.3u-1995, there is a Physical Coding Sublayer (PCS), a Physical Media Access (PMA) sublayer, and a Physical Media Dependent (PMD) sublayer. The PCS defines how data is encoded and decoded, how the Carrier Sense (CS) and Collision Detection (CD) functions work, and the interface between higher and lower layers in the protocol specification. The PMA defines the mapping of code bits, generation of a control signal (link_status) which indicates the availability of the PMD, generation of control signals to the PCS that indicate Carrier Sense, Collision Detection and Physical Layer Errors, and clock recovery. The PMD defines the signaling method and the various physical parameters that are necessary to address the link""s physical requirements.
IEEE standard 802.3u-1995 clause 28 defines a mechanism of auto-negotiation between two auto-negotiation capable nodes to detect the capabilities of each other. The capabilities are advertised by the nodes through link pulses. Once the nodes have auto-negotiated they can configure themselves to the highest common capability supported by both nodes. However, for nodes which do not support auto-negotiation, there is no other automatic mechanism for allowing nodes to detect the capabilities of each other and configure themselves to the highest common capability supported by both nodes.
As per the IEEE 802.3u standard, the minimum capability of any node is to support 10 Megabits data transfer in half duplex. Using auto-negotiation, the nodes configure themselves to operate in full duplex if both nodes know each other""s capabilities. However, if a node does not support auto-negotiation through link pulses, the node may not have any knowledge of the other node""s capability. Therefore, the node cannot auto-configure to run in full duplex mode even if both nodes have the ability to run in full duplex. In order to run the link between two full duplex capable nodes in full duplex mode, both nodes need to be set manually through a console. This requires a central processing unit (CPU) to be present within each node. However, if a node is built without a CPU or console interface, another mechanism is needed to manually set the node""s duplex mode. This can be accomplished by a hardware switch provided at the front plane. However, use of such a switch can be tedious and not user friendly.
In accordance with the preferred embodiment of the present invention, a first device detects whether a second device implements and is configured in full duplex communication. When the first device begins receiving a network packet from the second device, the first device transmits a jam signal to the second device. When transmission of the network packet from the second device to the first device has been completed, the first device determines whether a check value within the network packet is valid. When the check value is valid, the first device recognizes that the second device implements and is configured in full duplex communication. When the check value is not valid, the first device recognizes that the second device does not implement full duplex communication.
In the preferred embodiment, a state machine within the first device controls the process. The state machine includes various states. In a first (XMIT_JAM) state, a jam signal is transmitted from the first device to the second device. The XMIT_JAM state is entered when the first device is receiving a network packet from the second device.
A second (SET_MODE) state is entered from the XMIT_JAM state when transmission of the network packet from the second device to the first device has been completed. In the SET_MODE state, the state machine recognizes the second device implements full duplex communication when a check value within the network packet is valid.
In a third (WAIT) state, the first device waits to receive a network packet from the second device. The state machine transitions from the WAIT state to the XMIT_JAM state when the first device is receiving a network packet from the second device.
The state machine enters a fourth (XMIT) state from the WAIT state when the first device has a transmission packet to be sent to the second device. The first device transmits the transmission packet while the state machine is in the XMIT state. The state machine transitions from the XMIT state to the WAIT state when the transmission packet has been successfully sent to the second device.
The state machine enters a fifth (XMIT_TX_JAM) state from the XMIT state when the first device begins receiving a network packet from the second device. When the state machine is in the XMIT_TX_JAM state, the first device aborts the transmission packet and transmits a jam signal to the second device.
The state machine enters a sixth (SET_TX_MODE) state from the XMIT_TX_JAM state when transmission of the network packet from the second device to the first device has been completed. In the SET_MODE state, the state machine recognizes the second device implements full duplex communication when a check value within the network packet is valid.
The state machine enters a seventh (SEND_CURRENT) state from the SET_TX_MODE state. When the state machine is in the SEND_CURRENT state, the transmission which was aborted in the XMIT_TX_JAM state is performed. If the variable DUPLEX_Mode is equal to the constant HALF, transmission is done based on CSMA/CD.
The state machine enters a STOP state from the SET_MODE state or from the SEND_CURRENT state. In the STOP state the state machine detection is complete.
In an initial (START) state, before entering the WAIT state, the state machine initiates values which indicate the second device does implement half duplex communication and the state machine detection is not complete.